home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
0022-3.564
/
dmg-0143
/
articles
/
gfa.doc
< prev
next >
Wrap
Text File
|
1997-04-16
|
1KB
|
50 lines
-----------------------
GFA TUTORIAL - PART ONE
-----------------------
Written by Rich Stockdale
NOTE:The following document was submitted to ST Format as a short
article for 'Hints and Tips' but no reply was given at all.
GFA Basic is an excellent programming language, but it does
have a few annoying bugs. One of it's most annoying errors is
that for some reason setting up the colour palette using
SETCOLOR is a complete disaster!!!
The listing below will reconfigure the order of the colour
palette so that it works just as well as the equivelent command
in any other BASIC language. It also resets the colours for the
editor,and redefines the boundries for the mouse pointer
(low rez only)... Notice what happens when you press
Control+Shift+Alt if you've messed up the colour palette!!!
NOTE: Place this at the start of your program,
SETCOLOR Register%(<r%>),<red>,<green>,<blue>
SETCOLOR Register%(<r%>),n
n=(red*256)+(green*16)+blue
DIM register%(15)
DATA 0,2,3,6,4,7,5,8,9,10,11,14,12,15,13,1
FOR r%=0 TO 15
READ register%(r%)
NEXT r
DPOKE (9958),319
ON BREAK GOSUB end_prog
GOTO start_of_program
'
PROCEDURE end_prog
DPOKE (9958),639
SETCOLOR 0,7,7,7
SETCOLOR 1,0
SETCOLOR 15,0
EDIT
RETURN
'
start_of_program Put your main program here